Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEPRECATED] fixinggggg #17

Closed
wants to merge 33 commits into from
Closed

Conversation

philipye314
Copy link
Contributor

What's new in this PR

Description

  • Created the AddCase screen
  • After successfully scanning a QR code, users will be redirected to the AddCase screen where they can read the case title, corresponding image, and short blurb describing the case.
  • Users can add case which adds a new entry to the "status" table with their userId and caseId

Screenshots

image ![image](https://github.com/calblueprint/impact-fund/assets/97428041/7567f0bb-4f09-47e2-9da8-9600d98f15b9)

How to review

Generate a QR code that stores a number corresponding to an ID in the cases table. Try scanning it, it should lead you to the AddCases page. You can also read debugging info in the terminal as well. Upon clicking add cases, check that the terminal outputs "null" (this corresponds to the error object returned by Supabase, if all goes well it should be null).

Next steps

Refactor query and delete the automatic sign-in/sign-out. Decide where error handling from supabase should go as well. Need to test multipple users, right now we know 1 user cannot upload the same case twice, so I only have 1 of each case in the table - thus I'd like to test it with different users.

Relevant Links

Online sources

https://docs.expo.dev/routing/navigating-pages/

Related PRs

CC: @stephaniewong2

@linear
Copy link

linear bot commented Oct 19, 2023

IMP-7 Confirm Case Screen

Description

Build out the post QR code scanner screen as shown below. Assume the QR Code Scanner works as expected and write a query to fetch the case information - title, image, and blurb - based on the Case ID, which will be embedded in the QR code. If "Add to Cases" is clicked, add the case to the user's list of cases but don't worry about navigation for the button for now. If "Cancel" is clicked, return to the Cases screen.

Ronnie worked on something similar for Veggies last semester so he will be your mentor for this sprint!

Screen Shot 2023-10-08 at 4.21.05 AM.png

Useful Links

Expo navigation docs: https://docs.expo.dev/routing/navigating-pages/

Related PRs

ronniebeggs and others added 5 commits October 18, 2023 21:39
* [wip] create basic component structure for case cards.

* [style] basic case card styling complete.

* [feat] add props to case card.

* [feat] implement flatlist for conditional case rendering.

* [feat] render cases through useEffect hook.

* [wip] attempt to build supabase queries.

* [bruh]

* [wip] implement cases query util.

* [feat] move wip implementation to avoid merge conflicts.

* [refactor] create separate paths for cases and qr code scanning screens.

* [wip] refactor query util to improve typing consistency.

* [feat] create util for individual case query.

* [feat] create function that fetches several cases at once.

* [feat] build query to fetch caseIds associated with a given user.

* [refactor] add docstrings, comments, and better error handling.

* [feat] add placeholder button for navigation to QR code screen.

* [feat] implement routing in camera button.

* [style] cleanup styling to match figma.

* [cleanup] minor fixes before push.

* [refactor] reorder file navigation structure to fit cases page.

* [fix] hardcode better data for testing.

* [cleanup] eslint and prettier checks.

* [fix] dependency issues.

* [refactor] refactor code with new typing scheme.

* [feat] create caseCard type to pass only select props into card.

* [feat] create query to fetch logged in user data to render cases associated with specific user.

* [wip][feat] able to render cases for specific user after long load.

* [feat] complete user-specific case render, including a loading screen.

* [cleanup] prettier and eslint errors.

* [wip] integrating Cases page into bottom tab navigation.

* [feat] implement routing to QRCodeScanner from Cases screen.

* [fix] fix dependencies and PR review nits.

* [cleanup] create parseCase query helper function.
…print/impact-fund into philip/imp-7-confirm-case-screen
Copy link
Collaborator

@stephaniewong2 stephaniewong2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have yet to address styling but I'll get back to you shortly! Let me know if you need any help or if something doesn't make sense!

stephaniewong2 and others added 22 commits October 20, 2023 01:19
…print/impact-fund into philip/imp-7-confirm-case-screen
* [wip][feat] create files for basic screen.

* [feat] basic navigation to screen from CaseCard.

* [feat] restructure prop setup to pass caseData through navigation state.

* [feat] setup caseData access on CaseScreen.

* [fix] fix data transfer accross screens.

* [fix] allow rendering of multiple different cases.

* [cleanup] remove errored line.

* [feat] build component placeholders for CaseScreen.
@philipye314 philipye314 changed the title fixinggggg [DEPRECATED] fixinggggg Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants